#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
    int arr[11] = { 0 };
    int n = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &arr[i]);
    }
    int count = 0;
    for (int i = 0; i < n - 1; i++)
    {
        /*count++;
         if(count%3!=0)
             printf("%d ",arr[i+1]-arr[i]);
         if(count%3==0)
         {
             printf("%d",arr[i+1]-arr[i]);
             printf("\n");
         }*/
        printf("%d", arr[i + 1] - arr[i]);
        if ((i + 1) % 3 == 0)
            printf("\n");
        else if (i < n - 2)
            printf(" ");
    }
    return 0;
}